<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Initializes MySQLi and returns a resource for use with mysqli_real_connect()</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="mysqli.info.html">mysqli::$info</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="mysqli.insert-id.html">mysqli::$insert_id</a></div>
 <div class="up"><a href="class.mysqli.html">MySQLi</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="mysqli.init" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">mysqli::init</h1>
  <h1 class="refname">mysqli_init</h1>
  <p class="verinfo">(PHP 5)</p><p class="refpurpose"><span class="refname">mysqli::init</span> -- <span class="refname">mysqli_init</span> &mdash; <span class="dc-title">Initializes MySQLi and returns a resource for use with mysqli_real_connect()</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-mysqli.init-description">
  <h3 class="title">说明</h3>
  <p class="para">面向对象风格</p>
  <div class="methodsynopsis dc-description">
   <span class="type"><a href="class.mysqli.html" class="type mysqli">mysqli</a></span> <span class="methodname"><strong>mysqli::init</strong></span>
    ( <span class="methodparam">void</span>
   )</div>

  <p class="para rdfs-comment">过程化风格</p>
  <div class="methodsynopsis dc-description">
   <span class="type"><a href="class.mysqli.html" class="type mysqli">mysqli</a></span> <span class="methodname"><strong>mysqli_init</strong></span>
    ( <span class="methodparam">void</span>
   )</div>

  <p class="para rdfs-comment">
   Allocates or initializes a MYSQL object suitable for
   <span class="function"><a href="mysqli.options.html" class="function">mysqli_options()</a></span> and <span class="function"><a href="mysqli.real-connect.html" class="function">mysqli_real_connect()</a></span>.
  </p>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
   <p class="para">
    Any subsequent calls to any mysqli function (except <span class="function"><a href="mysqli.options.html" class="function">mysqli_options()</a></span>)
    will fail until <span class="function"><a href="mysqli.real-connect.html" class="function">mysqli_real_connect()</a></span> was called.
   </p>
  </p></blockquote>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-mysqli.init-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns an object.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-mysqli.init-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   See <span class="function"><a href="mysqli.real-connect.html" class="function">mysqli_real_connect()</a></span>.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-mysqli.init-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="mysqli.options.html" class="function" rel="rdfs-seeAlso">mysqli_options()</a> - Set options</span></li>
    <li class="member"><span class="function"><a href="mysqli.close.html" class="function" rel="rdfs-seeAlso">mysqli_close()</a> - 关闭先前打开的数据库连接</span></li>
    <li class="member"><span class="function"><a href="mysqli.real-connect.html" class="function" rel="rdfs-seeAlso">mysqli_real_connect()</a> - Opens a connection to a mysql server</span></li>
    <li class="member"><span class="function"><a href="function.mysqli-connect.html" class="function" rel="rdfs-seeAlso">mysqli_connect()</a> - 别名 mysqli::__construct</span></li>
   </ul>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="mysqli.info.html">mysqli::$info</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="mysqli.insert-id.html">mysqli::$insert_id</a></div>
 <div class="up"><a href="class.mysqli.html">MySQLi</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
